<?php

namespace App\Containers\AppSection\Moderation\Data\Repositories;

use App\Ship\Parents\Repositories\Repository;

class ModerationRepository extends Repository
{
    /**
     * @var array
     */
    protected $fieldSearchable = [
        'project.id' => 'LIKE',
        'project.profile.id' => 'LIKE',
        'project.profile.legal_form.personal.fio' => 'LIKE'
    ];

    public function haveCount($relation, $count, $operator = '='): self
    {
        $this->model = $this->model->has($relation, $operator, $count);

        return $this;
    }
}
